using System.Linq;
using HeadspringExample.Core.Domain.Model;
using NUnit.Framework;
using Should.Extensions.AssertExtensions;

namespace HeadspringExample.UnitTests.Core.Domain.Model
{
    [TestFixture]
    public class SessionTests
    {
        [Test]
        public void Should_construct_session_with_title_abstract_and_speaker()
        {
            string title = "Some Title";
            string @abstract = "A bunch of stuff";
            var speaker = new Speaker("Joe", "Schmoe");

            var session = new Session(title, @abstract, speaker);

            session.Title.ShouldEqual(title);
            session.Abstract.ShouldEqual(@abstract);
            session.Speaker.ShouldEqual(speaker);
            speaker.GetSessions().Any(s => s == session).ShouldBeTrue();
        }
    }
}